package com.briup.ch06.finals;

public final class SingleTon1 {
    //对外私有构造器:控制外界不能创建对象
    private SingleTon1()
    {
        System.out.println("私有的构造器");
    }
    //对外提供public,static
    public static SingleTon1 getInstance()
    {
        return obj;
    }
    //final修饰的变量：只能被赋值一次
    private static final SingleTon1 obj=new SingleTon1();
}
